require.config({
    baseUrl: document.getElementById('main').getAttribute('data-baseurl'),
    paths: {
        'angular': '../component/thirdParty/angular/angular',
        'angular-ui-router': '../component/thirdParty/angular-ui-router/release/angular-ui-router.min',
        'angular-async-loader': '../component/thirdParty/angular-async-loader/dist/angular-async-loader.min',
        'jquery': '../component/thirdParty/metro/jquery',
        'metro':'../component/thirdParty/metro/metro',
        "underscore":"../component/thirdParty/underscore/underscore",
        "rap":"http://rap.taobao.org/rap.plugin.js?projectId=2216",
    },
    shim: {
        "jquery": { exports: "jquery" },
        "rap":{deps:["jquery"],exports:"rap"},
        "metro":{deps:["jquery"],exports:"metro"},
        "underscore":{exports:"underscore"},
        'angular': { exports: 'angular',deps:["metro","underscore"] },
        'angular-ui-router': { deps: ['angular'] },
    }
});

require(['angular', 'app-routes','app-directives'], function(angular) {
    angular.element(document).ready(function() {
        angular.bootstrap(document, ['app']);
        angular.element(document).find('html').addClass('ng-app');
    });
});
